package com.wingsboat.common.core.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;

/**
 * @author wangzhong
 * @description: banner
 * @date 2024/2/1 9:07
 */
public class SuccessBannerUtils {
    private static final Logger LOGGER = LoggerFactory.getLogger(SuccessBannerUtils.class);

    /**
     * 打印banner
     */
    public static void banner() {
        try (InputStream is = SuccessBannerUtils.class.getResourceAsStream("/successBanner.txt")) {
            BufferedReader br = new BufferedReader(new InputStreamReader(is));
            String line = "";
            while ((line = br.readLine()) != null) {
                LOGGER.info(line);
            }
        } catch (Exception e) {
            LOGGER.error("banner file not exists");
        }
    }
}
